;*******************************************************************
;* Bondage - Permissions and general
;*******************************************************************
[procedure-updateBondage]
; set a bondage level based on merit and mood, and rng
    set#=#range,#zzMaxMerits
    subtract#=#range,#zzRed
    set#=#bondageLevel,#zzMaxMerits
    subtract#=#bondageLevel,#zzMerits
    add#=#bondageLevel,#invMood
    set#=#temp,#invMood
    subtract#=#temp,50
    multiply#=#temp,2
    add#=#bondageLevel,#temp
    random#=#temp,-100,100
    add#=#bondageLevel,#temp
    multiply#=#bondageLevel,4
    divide#=#bondageLevel,#range
    procedure=checkBondageCeiling
    procedure=checkBondageFloor

[procedure-checkBondageCeiling]
    if=#bondageLevel>3
    set#=#bondageLevel,3
    
[procedure-checkBondageFloor]
    if=#bondageLevel<0
    set#=#bondageLevel,0

[clothtype-Collar]
    check=collar
	attr=style
		Value=Normal
		value=Posture
            check=posture collar
	attr=Description

[clothtype-Shackles]
    attr=body part
        value=wrist
            check=wrist shackles
        value=ankle
            check=ankle shackles
        value=thigh
            check=thigh shackles
	attr=Description

[clothtype-Gag]
    check=gag
	attr=Style
		value=Ball
            check=ball gag
		value=Bit
            check=bit gag
		value=Inflatable
            check=inflatable gag
		value=stuffed
            check=stuffed gag
		value=Ring
            check=ring gag
		value=?
	attr=Description


[clothtype-Chains and bars]
    attr=style
        value=wrist chain
            check=wrist chain
        value=ankle chain
            check=ankle chain
        value=Set Chain
            check=Set Chain
        value=leash
            check=leash
        value=spread bar
            check=spread bar
	attr=Description
    
[clothtype-anchoring]
    attr=position
        value=wrist to post
            check=wrist to post
        value=ankle to post
            check=ankle to post
        value=collar to post
            check=collar to post
        value=hand above head
            check=hand above head
	attr=Description
    
[clothtype-Harness]
    attr=style
        value=strap-in harness
            check=strap-in harness
        value=crotch rope
            check=crotch rope
	attr=Description

[clothtype-extra Bondage]
    check=extra Bondage
    attr=Description
    
[clothtype-Other Bondage Items]
	attr=style
        value=diaper
            check=diaper
    attr=Description
    
;*******************************************************************
;* Clothing Sets - Bondage Items
;*******************************************************************
[set-Collar]
    Select=All		
    Option=collar
        check=collar
            
[set-wristShackles]
	Select=All
    Option=Wrist shackles
        check=wrist shackles
            
[set-AnkleShackles]
	Select=All
    option=Ankle shackles
        check=ankle shackles
            
[set-wristChain]
	Select=All
    option=Wrist Chain
        check=Wrist Chain
            
[set-AnkleChain]
	Select=All
    option=Ankle Chain
        check=Ankle Chain
 
[set-SetChain]
	Select=All
    option=Set Chain
        check=Set Chain

                
;*******************************************************************
;* Clothing Sets - Bondage Options
;*******************************************************************               
[set-Bondage]
    set=regularBondage
    set=extraBondage
    
[set-regularBondage]
    select=All
    set=Bondage0
    set=Bondage1
    set=Bondage2
    set=Bondage3
    
[set-bondage0]
    if=#bondageLevel=0
    select=All
    change=daily
    set=collar
        
[set-bondage1]
    if=#bondageLevel=1
    select=All
    change=daily
    set=collar
    Set=WristShackles
            
[set-bondage2]
    if=#bondageLevel=2
    select=All
    change=daily
    set=collar
    Set=WristShackles
    Set=AnkleShackles
    
[set-bondage3]
    if=#bondageLevel=3
    select=All
    change=daily
    set=collar
    Set=WristShackles
    Set=AnkleShackles
    Set=SetChain

[set-extraBondage]
    if=extraBondage
    select=All
    choice=new
        option=extra Bondage
            checked=extra Bondage